package de.rts.components;

import java.awt.Color;
import java.awt.Point;

public class Signal implements RailComponent
{
  private String signalId;
  private Color  currentSignal = WHITE;
  private Point  position;

  public Signal(String signalId)
  {
    this(new Point(), signalId);
  }

  public Signal(Point position, String signalId)
  {
    this.signalId = signalId;
    this.position = position;
  }

  public String getSignalId()
  {
    return signalId;
  }

  public Color getCurrentSignal()
  {
    return currentSignal;
  }

  public void setCurrentSignal(Color currentSignal)
  {
    this.currentSignal = currentSignal;
  }

  public int getXPosition()
  {
    return position.x;
  }

  public int getYPosition()
  {
    return position.y;
  }

  @Override
  public String toString()
  {
    return "Signal [signalId=" + signalId + ", currentSignal=" + currentSignal + "]";
  }
}
